﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Feedback.DataAccess
{
    public class FeedbackContextEx : FeedbackContext
    {
        #region Query execution helper methods
        public IQueryable<TReturnType> Query<TReturnType>(Func<FeedbackContext, IQueryable<TReturnType>> query)
        {
            return query(this);
        }
        public IQueryable<TReturnType> Query<Arg0, TReturnType>(Func<FeedbackContext, Arg0, IQueryable<TReturnType>> query, Arg0 arg0)
        {
            return query(this, arg0);
        }

        public IQueryable<TReturnType> Query<Arg0, Arg1, TReturnType>(Func<FeedbackContext, Arg0, Arg1, IQueryable<TReturnType>> query, Arg0 arg0, Arg1 arg1)
        {
            return query(this, arg0, arg1);
        }

        public IQueryable<TReturnType> Query<Arg0, Arg1, Arg2, TReturnType>(Func<FeedbackContext, Arg0, Arg1, Arg2, IQueryable<TReturnType>> query, Arg0 arg0, Arg1 arg1, Arg2 arg2)
        {
            return query(this, arg0, arg1, arg2);
        }
        #endregion
    }
}
